docs: Analyze NLS format differences between Wine locale.c and ReactOS XP/2003 infrastructure#6
Draft
Copilot wants to merge 1 commit into
Draft
docs: Analyze NLS format differences between Wine locale.c and ReactOS XP/2003 infrastructure#6Copilot wants to merge 1 commit into
Copilot wants to merge 1 commit into
Conversation
Copilot created this pull request from a session on behalf of
tkreuzer
June 7, 2026 08:30
View session
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
dll/win32/kernelbase/wine/locale.ctargets the Windows Vista+ (NT 6.0) NLS architecture. ReactOS currently implements the XP/2003 (NT 5.x) NLS architecture. The two are incompatible at the file format, section type numbering, and API level — makinginit_locale()non-functional on ReactOS today.Analysis written to
media/doc/nls_format_analysis.mdNtGetNlsSectionPtr type numbering conflict
The type numbers used by Wine bear no relation to ReactOS's
basesrv/nls.cmapping:STATUS_INVALID_PARAMETER_1— these types don't exist in Vista+STATUS_NOT_IMPLEMENTEDsortdefault.nls— called unconditionally at startupSTATUS_NOT_IMPLEMENTEDl_intl.nlsformat)geo.nlsMissing/stub APIs in ntdll
RtlGetLocaleFileMappingAddress— not exported at all;load_locale_nls()calls it unconditionallyNtGetNlsSectionPtr— marked-stub -version=0x600+RtlNormalizeString— marked-stub -version=0x600+NtInitializeNlsFiles— marked-stub -version=0x600+NLS file format mismatches
locale.nls: ReactOS has the old 2003 binary format (no'NSDS'magic). Wine expectsNLS_LOCALE_HEADER+NLS_LOCALE_DATA[](Vista+ format), which also embeds geo data. Geo data must move out of the separategeo.nls.sortdefault.nls: Does not exist in ReactOS. The oldsortkey.nls+sorttbls.nlspair is superseded by a single unified file containing sort weights, casemap, ctypes, sort GUIDs, expansions, compressions, and jamo tables.NtGetNlsSectionPtr(12, NormalizationC/D/KC/KD, …)finds no files, and type 12 is already occupied bygeo.nls.Codepage NLS files (
c_*.nls) — mostly resolvedtxt2nlsalready generates the correct header format with properTransDefaultChar/TransUniDefaultChar. The oldcreate_nls.calways wrote'?'for those fields and is now obsolete. Two static files (c_856.nls,c_878.nls) still lack.txtsources.NDK type gap
NLS_LOCALE_HEADERandNLS_LOCALE_DATAare only defined in Wine'ssdk/include/wine/winternl.h. They need to be added to the ReactOS NDK headers beforeRtlGetLocaleFileMappingAddresscan be implemented natively.